//
//  UploadView.swift
//  XiaohuijiVPN
//
//  Created by whale on 2022/10/19.
//

import UIKit
import Macaw

class SelectedItemView: UIControl {
    
    required init() {
        super.init(frame: .zero)
        _initUI()
    }
    
    required init?(coder: NSCoder) {
        fatalError("init(coder:) has not been implemented")
    }
    
    func _initUI() {
     
        icon = SVGView()
        icon.contentMode = .scaleToFill
        icon.fileName = "globe"
        
        
        lbl = UILabel()
        lbl.textColor = .white
        lbl.text = "请选择服务"
        lbl.font = .font(13)
        
        arrow = UILabel()
        arrow.iconfont(IconFont.arrow_right_bold, fontSize: 15)
        arrow.textColor = .white
        arrow.textAlignment = .right
        
        addSubview(icon)
        addSubview(lbl)
        addSubview(arrow)
    }
    
    override func layoutSubviews() {
        super.layoutSubviews()
        icon.centerY(bounds.height/2).width_height(25.adapter).left(12.adapter)
        lbl.top_bottom_offsetLeft(icon, x: 10.adapter).right(bounds.width - 32.adapter)
        arrow.centerY(bounds.height/2).right(bounds.width - 12.adapter).width_height(20.adapter)
    }
    
    var icon: SVGView!
    var lbl: UILabel!
    private var arrow: UILabel!

}
